package top.lisicheng.common.config;

import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.amqp.rabbit.listener.RabbitListenerContainerFactory;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * @author Lisicheng
 */
@Configuration
public class RabbitMqConfigutration {

    // @Bean("rabbitListenerContainerFactory2")
    // public RabbitListenerContainerFactory rabbitListenerContainerFactory(ConnectionFactory connectionFactory) {
    //     SimpleRabbitListenerContainerFactory simpleRabbitListenerContainerFactory = new SimpleRabbitListenerContainerFactory();
    //     simpleRabbitListenerContainerFactory.setConnectionFactory(connectionFactory);
    //     simpleRabbitListenerContainerFactory.setMessageConverter(new Jackson2JsonMessageConverter());
    //     return simpleRabbitListenerContainerFactory;
    // }

}
